<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport"   content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <script src="./static/js/rem.js"></script>
    <link rel="stylesheet" href="./static/css/base.css">
    <link rel="stylesheet" href="./static/css/index.css">
    <link rel="stylesheet" href="./static/css/swiper.min.css">

    <title>Document</title>
</head>
<body>
    <div class="content">
        <!-- 头部图片 -->
        <div class="topimg">
            <div class="swiper-container" id="swiper">
                <div class="swiper-wrapper">
                <div class="swiper-slide">
                    <div class="title txt">
                        <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000"></a>
                    </div>
                </div>
                <div class="swiper-slide">
                    <div class="title txt">
                        <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000"></a>
                    </div>
                    <!-- <h2 class="homepage-headline txt">Series 2 新登场。</h2> -->
                </div>
                <div class="swiper-slide">
                    <div class="title txt">
                        <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000"></a>
                    </div>
                    <!-- <p> 一身才华，一触即发 </p> -->
                </div>
                </div>
                <ul class="swiper-pagination autoplay"> </ul>
            </div>            
        </div>

        <!-- 菜单 -->
        <ul class="nav">
            <li>
                <a href="#">首页</a>
            </li>
            <li>
                <a href="#">健康管理师</a>
            </li>
            <li>
                <a href="#">成人高考</a>
            </li>
            <li>
                <a href="#">教师资格证</a>
            </li>
        </ul>

        <!-- banner  -->
        <div class="banner">
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
        </div>

        <div class="list-title">
            <div class="hd">培训课程</div>
            <a href="./list.html">查看更多课程</div>
        </div>
        <!-- 列表 -->
        <div class="listbox">
            <div class="item">
				<a href="#">
					<div class="img"></div>
					<div class="title">
						考试科目
					</div>
					<div class="desc">
						国考改革后，由教育学、教育心理学改为综合素质、教育知识与能力，省考试讲改为国考机构化面试
					</div>
				</a>
            </div>
            <div class="item">
                <div class="img"></div>
                <div class="title">
                    考试科目
                </div>
                <div class="desc">
                    国考改革后，由教育学、教育心理学改为综合素质、教育知识与能力，省考试讲改为国考机构化面试
                </div>
            </div>
            <div class="item">
                <div class="img"></div>
                <div class="title">
                    考试科目
                </div>
                <div class="desc">
                    国考改革后，由教育学、教育心理学改为综合素质、教育知识与能力，省考试讲改为国考机构化面试
                </div>
            </div>
            <div class="item">
                <div class="img"></div>
                <div class="title">
                    考试科目
                </div>
                <div class="desc">
                    国考改革后，由教育学、教育心理学改为综合素质、教育知识与能力，省考试讲改为国考机构化面试
                </div>
            </div>
            <div class="item">
                <div class="img"></div>
                <div class="title">
                    考试科目
                </div>
                <div class="desc">
                    国考改革后，由教育学、教育心理学改为综合素质、教育知识与能力，省考试讲改为国考机构化面试
                </div>
            </div>
            <div class="item">
                <div class="img"></div>
                <div class="title">
                    考试科目
                </div>
                <div class="desc">
                    国考改革后，由教育学、教育心理学改为综合素质、教育知识与能力，省考试讲改为国考机构化面试
                </div>
            </div>
        </div>

        <!-- 中间图片 -->
        <div class="ad">
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
        </div>

        <div class="form">
            <div class="form-item">
                <div class="label">
                    <span class="star">*</span>
                    咨询课程
                </div>
                <div class="iptbox">
                    <input type="text" id="j_course"  placeholder="请输入"/>
                </div>
            </div>
            <div class="form-item">
                <div class="label">
                    <span class="star">*</span>
                    称呼
                </div>
                <div class="iptbox">
                    <input type="text" id="j_name" placeholder="请输入您的称呼"/>
                </div>
            </div>
            <div class="form-item">
                <div class="label">
                    <span class="star">*</span>
                    电话
                </div>
                <div class="iptbox">
                    <input type="tel"  id="j_tel" placeholder="请输入手机号"/>
                </div>
            </div>
            <div class="form-item flex-center">
                <input type="checkbox" id="check">
                <label for="check">自动输入历史手机号</label><a href="#">《个人信息授权书》</a>
            </div>
            <div class="btn">
                <button type="button" onclick="handleSubmit()">立即提交</button>
            </div>
        </div>

        <div class="notice">
            <ul class="notice-list" id="roll">
                <li>
                    <div class="notice-item">
                        <span class="name">超级先后</span>
                        <span class="tel">15923356221</span>
                        <span class="time">41分钟前</span>
                    </div>
                </li>
                <li>
                    <div class="notice-item">
                        <span class="name">超级先后</span>
                        <span class="tel">15923356221</span>
                        <span class="time">41分钟前</span>
                    </div>
                </li>
                <li>
                    <div class="notice-item">
                        <span class="name">超级先后</span>
                        <span class="tel">15923356221</span>
                        <span class="time">41分钟前</span>
                    </div>
                </li>
                <li>
                    <div class="notice-item">
                        <span class="name">超级先后</span>
                        <span class="tel">15923356221</span>
                        <span class="time">41分钟前</span>
                    </div>
                </li>
                <li>
                    <div class="notice-item">
                        <span class="name">超级先后</span>
                        <span class="tel">15923356221</span>
                        <span class="time">41分钟前</span>
                    </div>
                </li>
                <li>
                    <div class="notice-item">
                        <span class="name">超级先后</span>
                        <span class="tel">15923356221</span>
                        <span class="time">41分钟前</span>
                    </div>
                </li>
            </ul>
        </div>

        <!-- 底部图片 -->
        <div class="foot-ad">
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
            <a href=""><img src="https://inews.gtimg.com/newsapp_bt/0/12773095312/1000" /></a>
        </div>
        <div class="footer">
            广州文拓教育咨询有限公司
        </div>
    </div>
    <script src="./static/js/zepto.min.js"></script>
    <script src="./static/js/swiper.min.js"></script>
    <script src="./static/js/banner.js"></script>
    <script>
        var lock = false
        //表单提交
        function handleSubmit() {
            var name = $('#j_name').val()
            var course = $('#j_course').val()
            var tel = $('#j_tel').val()

            if (lock) {
                return false
            }
            lock = true;

            if ($.trim(course).length == 0) {
                alert('请输入您要咨询的课程')
                return false
            }
            if ($.trim(name).length == 0) {
                alert('请输入您的称呼')
                return false
            }
            if ($.trim(tel).length == 0) {
                alert('请输入您的电话')
                return false
            }

            $.ajax({
                type: 'POST',
                url: '/test',
                data: {
                    name: name,
                    course: course,
                    tel: tel
                },
                dataType: 'json',
                success: function(data) {
                    alert("提交成功")
                    lock = false
                }
            })
        }
    </script>
    <script>
        var speed = 5;
        var delay = 4000;
        var height = 40;
        var time;
        window.onload = function(){

            swiperBanner();

            var area = document.getElementById("roll");            
            area.innerHTML += area.innerHTML;
            height = Math.floor(area.getBoundingClientRect().height);

            function scroll(){
                if(area.scrollTop % height == 0){
                    clearInterval(time);
                    setTimeout(start,delay);
                }else{
                    area.scrollTop++;
                    if(area.scrollTop >= area.scrollHeight/2){
                        area.scrollTop = 0;
                    }
                }
                
            }
            function start(){
                time = setInterval(scroll,speed);
                area.scrollTop++;
            }
            setTimeout(start,delay);
        }
    </script>
</body>
</html>
